package com.prothink.threadproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.prothink.threadproject.entity.FormLogin;
import com.prothink.threadproject.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface LoginMapper extends BaseMapper<FormLogin> {
    // 根据用户名查询用户信息
    // 根据用户名查询用户信息
    @Select("SELECT * FROM form_login WHERE account = #{account}")
    FormLogin selectUserByUsername(String account);

    // 新增用户
    @Insert("INSERT INTO form_login (account, email, pwd, phone) VALUES (#{account}, #{email}, #{pwd}, #{phone})")
    int insertUser(FormLogin user);
}
